<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>用户中心</title>
	<link rel="stylesheet" href="style/base.css" type="text/css">
	<link rel="stylesheet" href="style/global.css" type="text/css">
	<link rel="stylesheet" href="style/header.css" type="text/css">
	<link rel="stylesheet" href="style/home.css" type="text/css">
	<link rel="stylesheet" href="style/user.css" type="text/css">
	<link rel="stylesheet" href="style/bottomnav.css" type="text/css">
	<link rel="stylesheet" href="style/footer.css" type="text/css">

	<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="js/header.js"></script>
	<script type="text/javascript" src="js/home.js"></script>
	<script src="js/layer/layer.js"></script>
</head>
<body>

	<div style="clear:both;"></div>

	<!-- 页面主体 start -->
	<div class="main w1210 bc mt10">
		<div class="crumb w1210">
			<h2><strong>我的XX </strong><span>> 账户信息</span></h2>
		</div>
		<!-- 左侧导航菜单 start -->
		<div class="menu fl">
			<h3>我的商城</h3>
			<div class="menu_wrap">
				<dl>
					<dt>订单中心 <b></b></dt>
					<dd><b>.</b><a href="order.html">我的订单</a></dd>
				</dl>

				<dl>
					<dt>账户中心 <b></b></dt>
					<dd class="cur"><b>.</b><a href="user.html">账户信息</a></dd>
					<dd><b>.</b><a href="address.html">收货地址</a></dd>
				</dl>
			</div>
		</div>
		<div class="content fl ml10">
			<div class="user_hd">
				<h3>账户信息</h3>
			</div>

			<div class="user_bd mt10">
				<!-- <form action="" method="post" id="account"> -->
					<ul>
						<li>
							<label  for="">用户名：</label>
							<input type="text" id="pno_up" class="txt" value="diamondwang"/>
						</li>
						<li>
							<label for="">昵称：</label>
							<input type="text" id="name_up" class="txt" value="diamondwang"/>
						</li>
						<li>
							<label for="">邮箱：</label>
							<input id="height_up" type="text" class="txt" value="13333333333" />
						</li>
						<li>
							<label for="">手机号码：</label>
							<input id="weight_up" type="text" class="txt" value="13333333333" />
						</li>
						<li>
							<label for="">&nbsp;</label>
							<input type="button" value="提交" class="sbtn"  onclick="update()"/>
						</li>
					</ul>
				<!-- </form> -->
			</div>
		</div>
		<!-- 右侧内容区域 end -->
	</div>
	<!-- 页面主体 end-->
	<!-- <span id="newfooter"></span> -->
    <!-- <script src="js/footer.js"></script> -->
<script>
var serCmsData = localStorage.getItem('token');

      function update() {
		var pno = $("#pno_up").val();
		var name = $("#name_up").val();
		var height = $("#height_up").val();
		var weight = $("#weight_up").val();
	
		var data={
			"pno":pno,
			"name":name,
			"height":height,
			"weight" : weight
		}
		$.ajax({
			type : "git",
			url : "http://hengzhi.ayvvv.com/api/user",
			data : data,
			async : true,
			headers: {
            "x-token": serCmsData
        },
			success: function (data ,textStatus, jqXHR){
	        	if(data.statue == 200){
	        		alert("更新成功了");
	        	}else{
	        		layer.msg('更新失败');
	        	}
		    }
		});
	}
</script>
</body>
</html>